package cn.tedu.boot06.controller;

import cn.tedu.boot06.entity.Product;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AxiosController {
    @RequestMapping("/helloAxios")
    public String helloAxios(){
        return "许启航大帅笔";
    }
    @RequestMapping("/p1")
    public String p1(String name,int age){
        return name+","+age;
    }
    @RequestMapping("/p2")
    public String p2(@RequestBody Product product){
        return product.toString();
    }

}
